<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link type="text/css" rel="stylesheet" href="/${initParam.context_root }/css/tab_cscenter.css">
<link type="text/css" rel="stylesheet" href="/${initParam.context_root }/css/notice.css">
<script type="text/javascript" src="/${ initParam.context_root }/script/jquery.js"></script>
<script type="text/javascript">

</script>
<div class="container">
	<div class="starter-template" style="padding-right: 40px; padding-top: 40px; padding-bottom: 80px" >

<h1>${requestScope.divideText }</h1>
<h4>${requestScope.divideTextSub }</h4>
<br>
<table id="content" class="table table-hover" cellpadding='0' cellspacing='0'>
	<thead>
	<tr>
		<td width="65px"><strong>글번호</strong></td>
		<td><strong>제목</strong></td>
		<!-- <th width="100px">작성자</th> -->
		<td width="130px"><strong>작성일</strong></td>
		<td width="60px"><strong>조회수</strong></td>
	</tr>
	<c:forEach items="${requestScope.cscenterList }" var="cscenter">
		<tr>
			<%-- <td>${cscenter.cscenterNo }</td> --%>
			<td>${cscenter.divideNo }</td>
			<td><a href="/${initParam.context_root }/cscenter/getContent.do?no=${cscenter.cscenterNo }&page=${requestScope.pagingBean.currentPage}&divide=${requestScope.divide }">${cscenter.title }</a></td>
			<%-- <td>${cscenter.nickname }</td> --%>
			<td>${cscenter.creDate }</td>
			<td>${cscenter.viewCnt }</td>
		</tr>
	</c:forEach>
</table>
<!-- 페이지 빈 ui처리 -->
<nav>
		<ul class="pagination">
	<c:choose>
		<c:when test="${requestScope.pagingBean.previousPageGroup }">
			<li class="disabled"><a
			href="/${initParam.context_root }/cscenter/list.do?page=${requestScope.pagingBean.startPageOfPageGroup - 1}&divide=${requestScope.divide }"><span aria-hidden="true">&laquo;
</span><span class="sr-only">◀</span></a></li>
		</c:when>
				<c:otherwise>
				<li class="disabled"><a href="#"><span aria-hidden="true">&laquo;</span><span
									class="sr-only">◀</span></a></li>
									</c:otherwise>
									</c:choose>
	<c:forEach begin="${requestScope.pagingBean.startPageOfPageGroup }"
					end="${requestScope.pagingBean.endPageOfPageGroup }"
					step="1"
					var="i">
		<c:choose>
			<c:when test="${i == requestScope.pagingBean.currentPage }">
				<li class="active"><a href="#">${i } <span class="sr-only">(current)</span></a></li>
			</c:when>
			<c:otherwise>
				<li><a href="/${initParam.context_root }/cscenter/list.do?page=${i}&divide=${requestScope.divide }">${i }<span class="sr-only">(current)</span>
								</a></li>
			</c:otherwise>
		</c:choose>
	</c:forEach>
	<c:choose>
		<c:when test="${requestScope.pagingBean.nextPageGroup }">
			<li><a href="/${initParam.context_root }/cscenter/list.do?page=${requestScope.pagingBean.endPageOfPageGroup +1}&divide=${requestScope.divide }"><span
									aria-hidden="true">&raquo;</span><span class="sr-only">▶</span></a></li>
		</c:when>
		<c:otherwise>
		<li class="disabled"><a href="#"><span aria-hidden="true">&raquo;</span><span
									class="sr-only">▶</span></a></li>
		</c:otherwise>
	</c:choose>
	</ul>
	</nav>
</div>
<c:if test="${requestScope.divide=='7'}">
<%-- <c:if test="${(requestScope.divide=='7')&&(not empty requestScope.login_info)}"> --%>
	<div align="right"><a href="/${initParam.context_root }/cscenter/login/writeForm.do?divide=${requestScope.divide }&page=${ requestScope.pagingBean.currentPage }" class="btn btn-primary" role="button">글쓰기</a></div>
	<%-- <div>
		<button onclick="javascript:window.location.href='/${initParam.context_root }/cscenter/login/writeForm.do?divide=${requestScope.divide }&page=${ requestScope.pagingBean.currentPage }'">글쓰기</button>
	</div> --%>
</c:if>
</div>